#ifndef borwein_h
#define borwein_h

// Standard headers
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <pthread.h>
#include <gmp.h>

#define ITERATIONS 10000000

// PI elements to process
typedef struct{
	mpf_t *a;
	mpf_t *b;
	mpf_t *p;
}PI_data;


// Global variables:

// Struct elements
PI_data pi_struct;

// Semaphores
pthread_mutex_t mutexa;
pthread_mutex_t mutexb;

// Threads
pthread_t thread[3];

// Global sequence counters
long counta;
long countb;
long countp;

#endif
